import request from '@/config/axios'

// 期刊申请详情 VO
export interface JournalApplyDetailVO {
  id: number // 主键
  journalId: number // 资源id
}

// 期刊申请详情 API
export const JournalApplyDetailApi = {
  // 查询期刊申请详情分页
  getJournalApplyDetailPage: async (params: any) => {
    return await request.get({ url: `/dr/journal-apply-detail/page`, params })
  },

  // 查询期刊申请详情详情
  getJournalApplyDetail: async (id: number) => {
    return await request.get({ url: `/dr/journal-apply-detail/get?id=` + id })
  },

  // 新增期刊申请详情
  createJournalApplyDetail: async (data: JournalApplyDetailVO) => {
    return await request.post({ url: `/dr/journal-apply-detail/create`, data })
  },

  // 修改期刊申请详情
  updateJournalApplyDetail: async (data: JournalApplyDetailVO) => {
    return await request.put({ url: `/dr/journal-apply-detail/update`, data })
  },

  // 删除期刊申请详情
  deleteJournalApplyDetail: async (id: number) => {
    return await request.delete({ url: `/dr/journal-apply-detail/delete?id=` + id })
  },

  // 导出期刊申请详情 Excel
  exportJournalApplyDetail: async (params) => {
    return await request.download({ url: `/dr/journal-apply-detail/export-excel`, params })
  },
}